package exam.test17;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Endstart
 * Date: 2020-12-15
 * Time: 20:41
 */
public class Main {

    public static void main(String[] args) {
        String wort1 = "Hello";
        String wort2 = "World";
        String wort3 = new String("Hello");

        if (wort1 == wort3) {
            wort2 += "　Peace";
        }

        Scanner scanner = new Scanner(System.in);
        System.out.println(scanner.nextLine().length());
        System.out.println(wort2);
    }

    public static boolean atLeastThreeTimes(String[] a) {
        for (int i = 0; i < a.length; i++) {
            String tmp = a[i];
            int count = 0;
            for (int j = 0; j < a.length; j++) {
                if (tmp.equals(a[j])) {
                    count++;
                    if (count >= 3) {
                        return true;
                    }
                }
            }
        }
        return false;
    }

//    public void test() {
//        int[][] arr = new int[3][3];
//        Matrix mat = new Matrix(arr);
//        arr[1][2] = 1; // setSElement
//        arr[1][2] = 0; // unsetSElement
//    }
}
